package com.pro.pojo;

import com.fasterxml.jackson.annotation.JsonFormat;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;
import java.util.Objects;

/**
 * @author cyj
 * @date 2022.1.13$ 16.54$
 * @content :
 */
public class JsOperationLog {
    private Integer id;
    private Integer operationType;//操作类型1、添加2、编辑3、查看4、删除
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date executionTime;//执行时间
    private String remarks;//备注
    private Integer updateId;//执行人
    private String updateName;//执行人名称
    private String operationList;//操作列表
    private String type;//1、商品2、课程3、微圈4、权限

    public JsOperationLog() {
        super();
    }

    @Override
    public String toString() {
        return "JsOperationLog{" +
                "id=" + id +
                ", operationType=" + operationType +
                ", executionTime=" + executionTime +
                ", remarks='" + remarks + '\'' +
                ", updateId=" + updateId +
                ", updateName='" + updateName + '\'' +
                ", operationList='" + operationList + '\'' +
                ", type='" + type + '\'' +
                '}';
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        JsOperationLog that = (JsOperationLog) o;
        return Objects.equals(id, that.id) &&
                Objects.equals(operationType, that.operationType) &&
                Objects.equals(executionTime, that.executionTime) &&
                Objects.equals(remarks, that.remarks) &&
                Objects.equals(updateId, that.updateId) &&
                Objects.equals(updateName, that.updateName) &&
                Objects.equals(operationList, that.operationList) &&
                Objects.equals(type, that.type);
    }

    @Override
    public int hashCode() {
        return Objects.hash(id, operationType, executionTime, remarks, updateId, updateName, operationList, type);
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public Integer getOperationType() {
        return operationType;
    }

    public void setOperationType(Integer operationType) {
        this.operationType = operationType;
    }

    public Date getExecutionTime() {
        return executionTime;
    }

    public void setExecutionTime(Date executionTime) {
        this.executionTime = executionTime;
    }

    public String getRemarks() {
        return remarks;
    }

    public void setRemarks(String remarks) {
        this.remarks = remarks;
    }

    public Integer getUpdateId() {
        return updateId;
    }

    public void setUpdateId(Integer updateId) {
        this.updateId = updateId;
    }

    public String getUpdateName() {
        return updateName;
    }

    public void setUpdateName(String updateName) {
        this.updateName = updateName;
    }

    public String getOperationList() {
        return operationList;
    }

    public void setOperationList(String operationList) {
        this.operationList = operationList;
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }
}
